home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # preinst script for dictionaries-common
-
- set -e
-
- case "$1" in install|upgrade)
- # This will clean up the alternatives for ispell-dictionary.hash
- # set by the pre-Policy ispell dictionary packages
- # A /var/lib/dpkg/alternatives/ispell-dictionary.hash file is sometimes left
- # if alternative was set to manual mode. Setting it to --auto ensures removal.
- DICTS=`/usr/sbin/update-alternatives --display ispell-dictionary.hash \
- | grep priority | cut -f1 -d" "`
- for i in $DICTS ; do
- /usr/sbin/update-alternatives --remove ispell-dictionary.hash $i
- done
- /usr/sbin/update-alternatives --auto ispell-dictionary.hash
- # The same for wordlists
- WORDS=`/usr/sbin/update-alternatives --display dictionary \
- | grep priority | cut -f1 -d" "`
- for i in $WORDS ; do
- /usr/sbin/update-alternatives --remove dictionary $i
- done
- /usr/sbin/update-alternatives --auto dictionary
- ;;
- esac
-
-
-
-